package org.jordens.jdbcspy.testutil.callbacks;

import org.jordens.jdbcspy.jmx.*;
import org.testng.*;

/**
 * A callback interface for responding to start/finish test events.
 * 
 * @author Adam Jordens
 */
public interface JDBCSpyListenerCallback
{
    /**
     * Callback method invoked upon the start of a TestNG suite
     */
    void onSuiteStart();

    /**
     * Callback method invoked upon the start of an individual test case
     *
     * @param jdbcSpy Reference to the JDBCSpyMBean
     * @param testResult TestNG result
     */
    void onStart(JDBCSpyMBean jdbcSpy, ITestResult testResult);

    /**
     * Callback method invoked upon the completion of an individual test case
     *
     * @param jdbcSpy Reference to the JDBCSpyMBean
     * @param testResult TestNG result
     */
    void onFinish(JDBCSpyMBean jdbcSpy, ITestResult testResult);

    /**
     * Callback method invoked upon the completion of a TestNG suite
     */
    void onSuiteFinish();
}
